;(function() {
		init_parsley();
	   	$("#form-submits").click(function(){
	   		var flag=$('#form-1').parsley('validate' );
	   		if(flag){
	   			$.post(
	   				"/admin/SystemSet/edit_post",
	   				$("#form-1").serialize(),
	   				function(data){
			      		if(data.flag){
			      			toastr['success']("操作成功！", '');
			      		}else{
			      		 	toastr['error'](data.msg,"操作失败！"); 
			      		}
			      		return false;
	   				},
	   				"json"
	   			);
	   			return false;
	   			}else{
	   				return false;
	   			}
	   	})
	   	 $("#form-submit1").click(function(){
  				if(is_auto_read()){
  					return false;
  				}
	   		var flag=$('#validate-form1').parsley('validate' );
	   		if(flag){
	   			$("#form-submit1").attr("disabled",true);
	   			var sex=$("#card_sex").val();
	   			var card_num=$("#card_num").val();
	   			var csharp=window.external;
	   			var flag=csharp.EditNoCard(card_num,sex);
	   			if(flag=='0'){
	   				toastr['success']("操作成功！", '');
	   			}else{
	   				toastr['error'](csharp.GetError(flag),"失败");
	   			}
	   			$("#form-submit1").removeAttr("disabled");
	   		}
	   	})
})();